package com.note.notes.service.internal;

import com.note.common.domain.Note;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @projectName：wow-note
 * @package：com.note.notes.service.internal
 * @className：RemoveShareService
 * @author：热伊木
 * @email：uyevan@163.com
 * @description：批量删除分享
 * @date：2024-06-04 21:47
 * @version：1.0
 */
@Component
@FeignClient(value = "note-share", contextId = "note-share-deleteShareByNoteIdList")
public interface RemoveShareService {

    /**
     * 通过笔记id批量删除分享
     *
     * @param internalKey
     * @param notes
     */
    @DeleteMapping(value = "/share/internal/deleteShareByNoteIdList")
    void deleteShareByNoteIdList(@RequestParam("internalKey") String internalKey,@RequestBody List<Note> notes);
}
